package com.itheima.pattern.factory.factory_abstract;

import com.itheima.pattern.factory.factory_method.Coffee;

public class Client {
    public static void main(String[] args) {
        // 创建意大利味甜品工厂
        DessertFactory factory = new ItalyDessertFactory();
        // 获取对应的拿铁咖啡
        Coffee coffee = factory.createCoffee();
        Dessert dessert = factory.createDessert();
        dessert.show();
        System.out.println(coffee.getName());
    }
}
